import 'package:flutter/material.dart';
import 'com_header.dart';

typedef void CallBack();

class MyNavbar {
  static TextStyle navStyle = TextStyle(
      fontSize: 18, color: YJColors.text_dark, fontWeight: FontWeight.w600);
  static TextStyle navStyleWhite = TextStyle(fontSize: 18, color: Colors.white);
  static TextStyle navStyleBlack =
      TextStyle(fontSize: 18, color: YJColors.text_dark);
  static TextStyle navSubStyle =
      TextStyle(fontSize: 12, color: YJColors.text_dark);

  static Widget leading(BuildContext context,
      {CallBack? onPresss, Color color = YJColors.text_dark}) {
    return InkWell(
      child: Container(
        child: Row(
          children: <Widget>[
            SizedBox(
              width: 10,
            ),
            // loadAssetImage("comm/back", width: 20),
            SizedBox(
              width: 10,
            ),
          ],
        ),
      ),
      onTap: () {
        if (onPresss == null) {
          Navigator.pop(context);
        } else {
          onPresss();
        }
      },
    );
  }

  static GlobalKey<ScaffoldState>? globalKey;

  static configGloblaKey(GlobalKey<ScaffoldState> globalKey) {
    MyNavbar.globalKey = globalKey;
  }
}
